<?php
namespace app\admin\controller;
use think\Controller;
use think\Request;
use app\admin\pojo\Logins;
use app\admin\serviceImp\LoginImp;
/**
 * 
 * @author Administrator
 *正规的控制器
 */
class Login extends Controller{
    protected $login;
    protected $login_result;
    protected $request;
    protected $loginI;
    public function __construct($username="admin",$password="123456",LoginImp $loginIntter){
        $this->login=new Logins($username, $password);
        $this->loginI=$loginIntter;
        
    }
    public function login()
    {
     
    $res=$this->loginI->login($this->login); 
    if($res){
        var_dump('登录成功');
    }else {
        var_dump('登录失败');
    }
    }
}